<?php
/**
 * get gender word helper
 *
 * @author kim
 */
class App_View_Helper_GenderWord extends Zend_View_Helper_Abstract
{
    /**
     * get word by gender
     *
     * @param  string $gender - user's gender
     * @param  string $type - which type of word
     * @return string
     */
    public function GenderWord($gender, $type = 'hisher')
    {
        $word = '';
        if (!empty($gender)) {
            if ($type == 'hisher') {
                if ($gender == 1) { $word = 'his'; }
                else if ($gender == 2) { $word = 'her'; }
                else if ($gender > 3) { $word = 'their'; }
                else { $word = "member's"; }
            } else {
                if ($gender == 1) { $word = 'him'; }
                else if ($gender == 2) { $word = 'her'; }
                else if ($gender > 3) { $word = 'them'; }
                else { $word = 'member'; }
            }
        }
        return $word;
    }
}